import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import {store} from './redux/store' //引入仓库

const root = ReactDOM.createRoot(document.getElementById('root'));

//让redux和react建立关联


function render(){
    root.render(
        <App store={store}/>
    );
}
render()

//让redux和react建立起关联
//subscribe即订阅 在仓库状态改变的时候触发
store.subscribe(render)


